package com.littlecar.business.service.impl;

import com.littlecar.business.repository.ds1.PrimaryRepository;
import com.littlecar.business.repository.ds2.ForeignRepository;
import com.littlecar.business.service.ProductService;
import com.littlecar.common.entity.product.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 描述：
 *
 * @author littlecar
 * @date 2020/2/27 14:41
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private PrimaryRepository primaryRepository;
    @Autowired
    private ForeignRepository foreignRepository;
    @Override
    public List<Product> getAllPrimaryProducts() {
        return primaryRepository.findAll();
    }

    @Override
    public List<Product> getAllForeignProducts() {
        return foreignRepository.findAll();
    }
}
